package com.gin.custom.cust2;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import com.gin.custom.R;

public class Cust2Activity extends AppCompatActivity {
    private RecyclerView recyclerView;
    private View popupView;

    public static Intent createIntent(Context cont) {
        return new Intent(cont, Cust2Activity.class);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_cust2);
        recyclerView = findViewById(R.id.recycler);
        recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
        recyclerView.setAdapter(new TestAdapter());
        popupView = findViewById(R.id.popup);


        View filter = findViewById(R.id.title2);
        filter.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (popupView.getVisibility() == View.VISIBLE) {
                    popupView.setVisibility(View.GONE);
                } else {
                    popupView.setVisibility(View.VISIBLE);
                }
            }
        });
    }
}
